<?
//status: regmail:0 ; off: 1; onchat:2; oncpanel: 3 ; lock:4


$username= isset($_POST['username']) ? $_POST['username'] : "";
$password= isset($_POST['password']) ? $_POST['password'] : "";
$fullname= isset($_POST['fullname']) ? $_POST['fullname'] : "";
$email= isset($_POST['email']) ? $_POST['email'] : "";

if(!empty($username) && !empty($password) && !empty($email))
{
	$password=md5($password);
	$rs=$dbsql->query("select * from ".$GLOBALS['first_table']."tbluser where cUserName='$username'");
	if($dbsql->num_rows($rs)>0)
	{
		$alert="Account name '".$username."' is taken";
	}else
	{
		$dbsql->query("insert ".$GLOBALS['first_table']."tbluser(cUserName,cPassword,cFullName,cEmail,iStatus) 
				values('$username','$password','$fullname','$email',1)");
		echo "<center>Thank you for registration at Provide Support!";
		echo "<br><a href='index.php?opt=login'>Login</a></center>";
		exit();
	}
}
?>